package org.dromara.tms.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.tms.domain.Product;

/**
 * 产品业务对象 tms_product
 *
 * @author wulongbo
 * @date 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Product.class, reverseConvertGenerate = false)
public class ProductBo extends BaseEntity {

    /**
     * 逻辑主键（简单自增主键）
     */
    @NotNull(message = "逻辑主键（简单自增主键）不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 子产品id
     */
    @NotBlank(message = "子产品id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sonProductId;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 部门ID
     */
    @NotNull(message = "部门ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deptId;

    /**
     * 产品sku
     */
    @NotBlank(message = "产品sku不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sku;

    /**
     * 产品中文名称
     */
    @NotBlank(message = "产品中文名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nameZh;

    /**
     * 产品英文名称
     */
    @NotBlank(message = "产品英文名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nameEn;

    /**
     * 产品申报价值(USD)
     */
    @NotNull(message = "产品申报价值(USD)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long price;

    /**
     * 材质
     */
    @NotBlank(message = "材质不能为空", groups = { AddGroup.class, EditGroup.class })
    private String material;

    /**
     * 品牌
     */
    @NotBlank(message = "品牌不能为空", groups = { AddGroup.class, EditGroup.class })
    private String brand;

    /**
     * 产品图片
     */
    @NotBlank(message = "产品图片不能为空", groups = { AddGroup.class, EditGroup.class })
    private String image;

    /**
     * 产品类型（0：独立产品，1：组合产品）
     */
    @NotBlank(message = "产品类型（0：独立产品，1：组合产品）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productType;


}
